package com.jy.api.enums;

import java.util.ArrayList;
import java.util.List;

public enum TestWechatTemplateCodeEnum {


    ZERO("会员消费模版", "qQn1UALjLvUNzAWVtJkIm8GV4k2TkNVCSEyLav5fBo8"),
    ONE("成为会员模版", "xdg2lv-sOnb60XA_ogGW7hjFPu30MD1GPgpDNaVke5k"),
    TWO("会员充值模版", "4kAJHZc3vj1hPPdWbhMULYDqeSAglrWTHipiglYHiZY"),
    THREE("退款成功通知模版", "66H0a-36aZc9ERt-lRIXEupRgwW4adVYHDpaf7Gk-r4"),
    FOUR("退款通知", "tm2tFQ5KA31L_bQIonDi6hU-ovVoI87LzT20t24mj_E"),
    FIVE("交班信息推送", "xadCh-ZbMCDd5ffMWKuJEFDwz678G6bfyJ5Z4EnayAk");

    /**
     * 枚举值
     */
    private final String code;

    /**
     * 枚举描述
     */
    private final String message;

    /**
     * 构造一个<code>LocalCacheEnum</code>枚举对象
     *
     * @param code
     * @param message
     */
    private TestWechatTemplateCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * @return Returns the code.
     */
    public String getCode() {
        return code;
    }

    /**
     * @return Returns the message.
     */
    public String getMessage() {
        return message;
    }

    /**
     * @return Returns the code.
     */
    public String code() {
        return code;
    }

    /**
     * @return Returns the message.
     */
    public String message() {
        return message;
    }

    /**
     * 通过枚举<code>code</code>获得枚举
     *
     * @param code
     * @return LocalCacheEnum
     */
    public static String getByCode(String code) {
        for (TestWechatTemplateCodeEnum _enum : values()) {
            if (_enum.getCode().equals(code)) {
                return _enum.getMessage();
            }
        }
        return null;
    }

    /**
     * 获取全部枚举
     *
     * @return List<LocalCacheEnum>
     */
    public List<TestWechatTemplateCodeEnum> getAllEnum() {
        List<TestWechatTemplateCodeEnum> list = new ArrayList<TestWechatTemplateCodeEnum>();
        for (TestWechatTemplateCodeEnum _enum : values()) {
            list.add(_enum);
        }
        return list;
    }

    /**
     * 获取全部枚举值
     *
     * @return List<String>
     */
    public List<String> getAllEnumCode() {
        List<String> list = new ArrayList<String>();
        for (TestWechatTemplateCodeEnum _enum : values()) {
            list.add(_enum.code());
        }
        return list;
    }
}
